package de.cbf.cam.dsa.model.entities.states.stateChanger;

import de.cbf.cam.dsa.model.entities.BattleChar;
import de.cbf.cam.dsa.model.entities.OneNPC;
import de.cbf.cam.dsa.model.entities.weapon.WeaponInUse;
import de.cbf.cam.dsa.model.entities.weapon.WeaponMeleeInUse;

public class StateChangerATPA extends StateChangerBase {
	
	/**
	 * @uml.property  name="ammountAT"
	 */
	private int ammountAT; 
	/**
	 * @uml.property  name="ammountPA"
	 */
	private int ammountPA;
	/**
	 * @uml.property  name="hand"
	 */
	private String hand;
	
//========================
//		constructors
//========================
	public StateChangerATPA(int ammountAT,int ammountPA,String hand) {
		this.ammountAT 	= ammountAT;
		this.ammountPA 	= ammountPA;
		this.hand 		= hand;
	}


//========================
//	   public methods
//========================


	@Override
	public void changeState(OneNPC character) {
			
	}
	
	@Override
	public void changeStateBattle(BattleChar character) {
		WeaponInUse weapon = character.getCharacter().getWeapon(hand);
		if (weapon instanceof WeaponMeleeInUse) {
			WeaponMeleeInUse meleeWeapon = (WeaponMeleeInUse) weapon;
			meleeWeapon.setATtack(meleeWeapon.getATtack()+ammountAT);
			meleeWeapon.setPArade(meleeWeapon.getPArade()+ammountPA);
			return;
		}	
	}


	/**
	 * @return
	 * @uml.property  name="ammountAT"
	 */
	public int getAmmountAT() {
		return ammountAT;
	}


	/**
	 * @param ammountAT
	 * @uml.property  name="ammountAT"
	 */
	public void setAmmountAT(int ammountAT) {
		this.ammountAT = ammountAT;
	}


	/**
	 * @return
	 * @uml.property  name="ammountPA"
	 */
	public int getAmmountPA() {
		return ammountPA;
	}


	/**
	 * @param ammountPA
	 * @uml.property  name="ammountPA"
	 */
	public void setAmmountPA(int ammountPA) {
		this.ammountPA = ammountPA;
	}


	/**
	 * @return
	 * @uml.property  name="hand"
	 */
	public String getHand() {
		return hand;
	}


	/**
	 * @param hand
	 * @uml.property  name="hand"
	 */
	public void setHand(String hand) {
		this.hand = hand;
	}

//========================
//    standard methods
//========================

//========================
// 	   private methods
//========================

//========================
// 	SHORT property access
//========================

//========================
//		getters
//========================

//========================
//		setters
//========================

//========================
//		listeners
//========================

}
